/** 
 * @file	msp_string.h
 * @brief	
 * 
 *  This file defined some interfaces about string.
 * 
 * @author	hlli
 * @version	1.0
 * @date	2010-05-17
 * 
 * @see		
 * 
 * <b>History:</b><br>
 * <table>
 *  <tr> <th>Version	<th>Date		<th>Author	<th>Notes</tr>
 *  <tr> <td>1.0		<td>2010-05-17	<td>hlli	<td>Create this file</tr>
 * </table>
 * 
 */

#ifndef __MSP_STRING_H__
#define __MSP_STRING_H__

#ifdef __cplusplus
extern "C"
{
#endif

size_t msp_strlen( const char* str );

char* msp_strcpy( char* dest, const char* src );
char* msp_strncpy( char* dest, const char* src, size_t count );

int msp_strcmp( const char* cs, const char* ct );
int msp_stricmp( const char* cs, const char* ct );
int msp_strncmp( const char* cs, const char* ct, size_t count );
int msp_strnicmp( const char* cs, const char* ct, size_t count );

char* msp_strchr( const char* str, char c );
char* msp_strrchr( const char* str, char c );
char* msp_strpbrk( const char* cs, const char* ct );
char* msp_strstr( const char* str, const char* sub_str );
char* msp_strnstr( const char* str, const char* sub_str, unsigned long len );
char* msp_strcasestr( const char* str, const char* sub_str );

long msp_strtoul( const char* nptr, char** endptr, int base );
int msp_atoi( const char* str );
char* msp_itoa( int value, char* string, int radix );

char* msp_strcat( char* dest, const char* src );
char* msp_strncat( char* dest, const char* src, size_t count );

char msp_tolower(char ch);
char* msp_strlower( char* str );

void* msp_memset( void *dst, int val, size_t count );
void* msp_memcpy( void* dst, const void* src, size_t count );
int msp_memcmp( const void* buf1, const void* buf2, size_t count );
void* msp_memchr( const void * buf, int chr, size_t cnt );
void* msp_memmove( void* dest, void* src, int count );

#ifdef  __cplusplus
}   /* ... extern "C" */
#endif

#endif /* __MSP_STRING_H__ */
